#include <RobotFactoryI.h>

#include <Ice/Ice.h>
#include <Ice/Application.h>

using namespace std;

class RobotServer : virtual public Ice::Application 
{
  virtual int run
    (int,
     char*[])
  {
    Ice::ObjectAdapterPtr adapter;

    adapter = communicator()->createObjectAdapterWithEndpoints
      ("RobotFactory", "default -p 9898");
    adapter->activate();
    adapter->add
      (new RobotFactoryI(),
       communicator()->stringToIdentity("RobotFactory"));

    communicator()->waitForShutdown();
    return 0;
  }
};

int
main
(int argc,
 char* argv[])
{
  RobotServer app;
  return app.main(argc, argv, "../config/config.server");
}
